package day03.practice;

import java.util.Scanner;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/14
 */
public class Practice02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入考试成绩: ");
        double score = scanner.nextDouble();
        int level;
        if (score>=90){
            level=1;
        }else if (score>=80){
            level=2;
        }else if(score>=70){
            level=3;
        }else if (score>=60)
            level=4;
        else {
            level=5;
        }
        switch (level) {
            case (1):
                System.out.println("A级");
                break;
            case (2):
                System.out.println("B级");
                break;
            case (3):
                System.out.println("C级");
                break;
            case (4):
                System.out.println("D级");
                break;
            default:
                System.out.println("不合格");
                break;
        }
    }
}